//    Copyright 2009 - 2012 Toddy
//
//    This file is part of Toddtris.
//
//    Toddtris is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    Toddtris is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with Toddtris.  If not, see <http://www.gnu.org/licenses/>.

// Class automatically generated by Dev-C++ New Class wizard

#ifndef INPUTREADER_H
#define INPUTREADER_H

#include "com/themightystags/toddtris/input/InputState.h"

using com::themightystags::toddtris::input::InputState;

namespace com {
	namespace themightystags {
		namespace toddtris {
			namespace input {
				class InputReader {

				// instances of this class cannot be copied
				// and should be passed by reference
				private:
					InputReader(const InputReader& object);
					InputReader& operator=(const InputReader& object);

				public:
					static InputState getInputState();

				private:
					static bool initialised;
					static InputState lastState;
					static char leftKeys[InputState::NUM_INPUTS];
					static char rightKeys[InputState::NUM_INPUTS];
					static char upKeys[InputState::NUM_INPUTS];
					static char downKeys[InputState::NUM_INPUTS];
					static char rotateKeys[InputState::NUM_INPUTS];
					static char antirotateKeys[InputState::NUM_INPUTS];
					static char pauseKeys[InputState::NUM_INPUTS];
					static char ghostKeys[InputState::NUM_INPUTS];
					static char holdKeys[InputState::NUM_INPUTS];
					static char dropKeys[InputState::NUM_INPUTS];
					static void init();
					static void setInputState(bool pressed[InputState::NUM_INPUTS],
									bool held[InputState::NUM_INPUTS],
									bool lastPressed[InputState::NUM_INPUTS],
									bool lastHeld[InputState::NUM_INPUTS],
									char keys[InputState::NUM_INPUTS]);

				};
			}
		}
	}
}
#endif // INPUTREADER_H
